<?php
// +----------------------------------------------------------------------
// | ThinkCMF [ WE CAN DO IT MORE SIMPLE ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013-2017 http://www.thinkcmf.com All rights reserved.
// +----------------------------------------------------------------------
// | Author: Dean <zxxjjforever@163.com>
// +----------------------------------------------------------------------
// API 模板文件，可以复制
namespace api\resource\controller;

use think\Db;
use think\Request;
use think\Validate;
use cmf\controller\RestBaseController;

class Biao16Controller extends RestBaseController
{


    public function one($data)
    {

        //查 这个表的数据
        @$new_data = $data[0]['content'];
        if (empty($new_data)) {
            return '';
        }
        switch ($new_data->radio1 ) {
            case 1:
                // code...
                $radio1_1= "checked";
                break;
            case 2:
                // code...
                $radio1_2= "checked";
                break;
            case 3:
                // code...
                $radio1_3= "checked";
                break;
            case 4:
                // code...
                $radio1_4= "checked";
                break;
            case 5:
                // code...
                $radio1_5= "checked";
                break;

            default:
                // code...
                break;
        }

        @$radio2_one =  $new_data->radio2 == 1 ?"checked" :"";
        @$radio2_two =  $new_data->radio2 == 2 ?"checked" :"";

       $html = '
        <div style="width: 650px;margin: 0 auto;">
            <div style="font-size: 16px;font-weight: 600;margin-bottom: 15px;">四、项目承担单位与参与单位基本情况表<br/><br/>（二）参与单位基本情况表（1）（适用于企业）</div>
            <table border="1" cellspacing="0px" cellpadding="5px" width="650">
                <thead>
                <tr>
                    <td colspan="6" style="font-weight: 600">单位基本信息</td>
                </tr>
                </thead>
                <tbody>
                <tr>
                    <td>单位名称</td>
                    <td colspan="3">'.@$new_data->text1.'</td>
                    <td>组织机构代码</td>
                    <td>'.@$new_data->text2.'</td>
                </tr>
                <tr>
                    <td>注册资金</td>
                    <td>'.@$new_data->text3.'</td>
                    <td>所在地区</td>
                    <td>'.@$new_data->text4.'</td>
                    <td>银行信用等级</td>
                    <td>'.@$new_data->text5.'</td>
                </tr>
                <tr>
                    <td>单位性质</td>
                    <td>'.@$new_data->text6.'</td>
                    <td>所属行业</td>
                    <td>'.@$new_data->text7.'</td>
                    <td>单位国别</td>
                    <td>'.@$new_data->text8.'</td>
                </tr>
                <tr>
                    <td>单位级别</td>
                    <td colspan="5">
                        <label><input type="radio" disabled v-model="radio1" '.@$radio1_1.'  value="1">国家（部委）级 (属)</label>
                        <label><input type="radio" disabled v-model="radio1" '.@$radio1_2.'  value="2">省级(属) </label>
                        <label><input type="radio" disabled v-model="radio1" '.@$radio1_3.'  value="3">市级（属)</label>
                        <label><input type="radio" disabled v-model="radio1" '.@$radio1_4.'  value="4">县区级（属）</label>
                        <label><input type="radio" disabled v-model="radio1" '.@$radio1_5.'  value="5">其它</label>
                    </td>
                </tr>
                <tr>
                    <td>单位法人</td>
                    <td>'.@$new_data->text9.'</td>
                    <td>证件类型</td>
                    <td>'.@$new_data->text10.'</td>
                    <td>证件号码</td>
                    <td>'.@$new_data->text11.'</td>
                </tr>
                <tr>
                    <td>职工总人数</td>
                    <td colspan="2">'.@$new_data->text12.'</td>
                    <td>研究人员数</td>
                    <td colspan="2">'.@$new_data->text13.'</td>
                </tr>
                <tr>
                    <td>上年度销售额（万元）</td>
                    <td colspan="2">'.@$new_data->text14.'</td>
                    <td>年利税（万元）</td>
                    <td colspan="2">'.@$new_data->text15.'</td>
                </tr>
                <tr>
                    <td>上年研发经费总额（万元）</td>
                    <td colspan="2">'.@$new_data->text16.'</td>
                    <td>研发经费占销售额比例（%）</td>
                    <td colspan="2">'.@$new_data->text17.'</td>
                </tr>
                <tr>
                    <td>企业认定情况</td>
                    <td colspan="5">
                        <label><input type="radio" disabled v-model="radio2" '.@$radio2_one.'value="1">高新技术企业</label>
                        <label><input type="radio" disabled v-model="radio2" '.@$radio2_two.' value="2">双软认证企业</label>
                    </td>
                </tr>
                </tbody>
            </table>
        </div>
        ';

            return $html;

    }



}
